package net.xiduth.game.player.dialogues;

import net.xiduth.game.player.content.ItemGambler;

/**
 * 
 * @author Kova+ (Alex)
 *
 */
public class GambleItemD extends Dialogue {
	
	int slotId;
	int npcId;
	
	@Override
	public void start() {
		npcId = (Integer) parameters[0];
		slotId = (Integer) parameters[1];
		sendNPCDialogue(npcId, NO_EXPRESSION, "Hello " + player.getDisplayName() + ", I'm the Gambler, I will take your item for a chance to win double it or maybe even a donator status. Wanna play?");
	}
	
	@Override
	public void run(int interfaceId, int option) {
		switch(stage) {
		case -1:
			sendOptionsDialogue("Select an Option", "Let's gamble!", "No thanks, too risky!", "More Information");
			stage = 0;
			break;
		case 0:
			switch(option) {
			case OPTION_1:
				sendNPCDialogue(npcId, NO_EXPRESSION, "Very well, click an item in your inventory that you wish to gamble with then we'll start.");
				end();
				ItemGambler.sendInvoData(player);
				break;
			case OPTION_2:
				sendNPCDialogue(npcId, NO_EXPRESSION, "You won't become the greatest by being a whimp but it's your choice.");
				end();
				break;
			case OPTION_3:
				sendNPCDialogue(npcId, NO_EXPRESSION, "You will gamble an item in your inventory by clicking on it. A random number will be chosen if it's a winning number you'll recieve x2 of your item or maybe even donator status!");
				stage = 0;
				break;
			}
			break;
		}
	}

	@Override
	public void finish() {

	}
}
